<a href="{dr_url('order/cart/index', ['mid' => '{dirname}'])}">我的购物车（<span id="dr_order_{dirname}_cart_nums">0</span>）</a>
<script type="text/javascript">
$(function () {
    $.ajax({
        type: "GET",
        url: '/index.php?s=order&c=cart&m=nums&mid={dirname}',
        dataType: "json",
        success: function (json) {
            if (json.code) {
                $('#dr_order_{dirname}_cart_nums').html(json.data);
            }
        }
    });
})
</script>